/**
 * 
 */
package evolution.mlp.neurons;

import java.util.Map.Entry;

import evolution.mlp.functions.Linear;

/**
 * @author camille
 * 
 */
public class Out extends Neuron {

	/*
	 * (non-Javadoc)
	 * 
	 * @see mlp.ANeuron#getValue()
	 */
	@Override
	public double getValue() {
		double total = 0;

		for (Entry<Neuron, Double> entry : in.entrySet()) {
			total += entry.getKey().getValue() * entry.getValue();
		}

		return Linear.getInstance().eval(total);
	}

}
